package com.myutil.draw;

import java.awt.Color;

import com.myutil.graph.CorEdge;

public class Edgedrawable extends Drawable{
	public CorEdge edge;

	public Edgedrawable(Color color,CorEdge edge) {
		this.color=color;
		this.edge = edge;
	}
	public Edgedrawable(CorEdge edge) {
		this.color=Color.gray;
		this.edge = edge;
	}
	
	public static Edgedrawable[] convertTo(CorEdge[] edges, Color color) {
		Edgedrawable[] draws=new Edgedrawable[edges.length];
		for(int i=0;i<edges.length;i++){
			draws[i]=new Edgedrawable(color, edges[i]);
		}
		return draws;
	}
	public static Edgedrawable[] convertTo(CorEdge[] edges) {
		Edgedrawable[] draws=new Edgedrawable[edges.length];
		for(int i=0;i<edges.length;i++){
			draws[i]=new Edgedrawable(edges[i]);
		}
		return draws;
	}

}
